package com.ruoyi.service.impl;

import java.math.BigDecimal;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.YcTaskMapper;
import com.ruoyi.domain.YcTask;
import com.ruoyi.service.IYcTaskService;
import com.ruoyi.common.core.text.Convert;

/**
 * 课题Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-08
 */
@Service
public class YcTaskServiceImpl implements IYcTaskService 
{
    @Autowired
    private YcTaskMapper ycTaskMapper;

    /**
     * 查询课题
     * 
     * @param id 课题ID
     * @return 课题
     */
    @Override
    public YcTask selectYcTaskById(Long id)
    {
        return ycTaskMapper.selectYcTaskById(id);
    }

    /**
     * 查询课题列表
     * 
     * @param ycTask 课题
     * @return 课题
     */
    @Override
    public List<YcTask> selectYcTaskList(YcTask ycTask)
    {
        return ycTaskMapper.selectYcTaskList(ycTask);
    }

    /**
     * 新增课题
     * 
     * @param ycTask 课题
     * @return 结果
     */
    @Override
    public int insertYcTask(YcTask ycTask)
    {
        return ycTaskMapper.insertYcTask(ycTask);
    }

    /**
     * 修改课题
     * 
     * @param ycTask 课题
     * @return 结果
     */
    @Override
    public int updateYcTask(YcTask ycTask)
    {
        return ycTaskMapper.updateYcTask(ycTask);
    }

    /**
     * 删除课题对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYcTaskByIds(String ids)
    {
        return ycTaskMapper.deleteYcTaskByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课题信息
     * 
     * @param id 课题ID
     * @return 结果
     */
    @Override
    public int deleteYcTaskById(Long id)
    {
        return ycTaskMapper.deleteYcTaskById(id);
    }

    @Override
    public int submitApplications(Long id) {
        return ycTaskMapper.submitApplications(id);
    }

    @Override
    public int updateSubmitForApproval(Long id) {
        return ycTaskMapper.updateSubmitForApproval(id);
    }

    @Override
    public int withdrawClaim(Long id) {
        return ycTaskMapper.withdrawClaim(id);
    }

    @Override
    public int refusal(Long id) {
        return ycTaskMapper.refusal(id);
    }

    @Override
    public int updateDismissTheApproval(Long id) {
        return ycTaskMapper.updateDismissTheApproval(id);
    }

    @Override
    public int consent(Long id) {
        return ycTaskMapper.consent(id);
    }

    @Override
    public int updateBeApproved(Long id) {
        return ycTaskMapper.updateBeApproved(id);
    }

    @Override
    public List<YcTask> selectYcTaskListAdmin(YcTask ycTask) {
        return ycTaskMapper.selectYcTaskListAdmin(ycTask);
    }

}
